import { H3Event } from 'h3'

export default eventHandler((event: H3Event) => {
  const res = event.node.res
  res.setHeader('Access-Control-Allow-Origin', '*')
  res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, PATCH, DELETE')
  res.setHeader('Access-Control-Allow-Headers', '*')
  // res.setHeader('Access-Control-Allow-Credentials', 'true')
})
